/**
 * Created by ZHOUSH on 3/8/2016.
 */
app.directive('dragging', ['$rootScope', '$timeout', 'draggingService',
    function ($rootScope, $timeout, draggingService) {
        return {
            restrict: 'A',
            link: function ($scope, $element, $attrs) {
                var type = $attrs['dragging'];
                if (draggingService[type]) {
                    draggingService[type]($element);
                }
            }
        }
    }
]);